package org.amphiprion.rfreplayanalyser.ui.lapanalyzer;

import java.awt.Color;

public class LapItem {
	public long driverId;
	public int lap;
	public Color color = Color.BLACK;
	public float laptime;
	public float sector1;
	public float sector2;
	public float sector3;

	public LapItem(long driverId, int lap) {
		this.driverId = driverId;
		this.lap = lap;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (driverId ^ driverId >>> 32);
		result = prime * result + lap;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		LapItem other = (LapItem) obj;
		if (driverId != other.driverId) {
			return false;
		}
		if (lap != other.lap) {
			return false;
		}
		return true;
	}

}
